package dcedit.factories;

// Import Application Classes
import java.awt.*;
import javax.swing.*;

import dcedit.util.*;

/** ComboBoxFactory class */
public class ComboBoxFactory {
   /** Private Constructor */
   private ComboBoxFactory() {} // constructor

   /** createLanguageList method */
   public static JComboBox<DCTextEditor.SyntaxStyle> createLanguageList() {
      final Dimension FONT_NAMES_SIZE = new Dimension(200, 20);

      Constants.LANGUAGE_LIST.setSelectedItem(Constants.DEFAULT_SYNTAX_STYLE);

      Util.setComponentSizes(Constants.LANGUAGE_LIST, FONT_NAMES_SIZE, true, true);

      Constants.LANGUAGE_LIST.setToolTipText(Constants.LANGUAGE_TOOLTIP_TEXT);

      Constants.LANGUAGE_LIST.addActionListener(ActionFactory.createTabPaneLanguageActionListener());

      return Constants.LANGUAGE_LIST;
   } // END createLanguageList

   /** createFontNameList method */
   public static JComboBox<String> createFontNameList() {
      final Dimension FONT_NAMES_SIZE = new Dimension(200, 20);

      Constants.FONT_NAME_LIST.setSelectedIndex(0);

      Util.setComponentSizes(Constants.FONT_NAME_LIST, FONT_NAMES_SIZE, true, true);

      Constants.FONT_NAME_LIST.setToolTipText(Constants.FONT_NAME_TOOLTIP_TEXT);

      Constants.FONT_NAME_LIST.addActionListener(ActionFactory.createTabPaneFontActionListener());

      return Constants.FONT_NAME_LIST;
   } // END createFontNameList

   /** createFontSizeList method */
   public static JComboBox<Integer> createFontSizeList() {
      final Dimension FONT_SIZES_SIZE = new Dimension(200, 20);

      Constants.FONT_SIZE_LIST.setSelectedIndex(10);

      Util.setComponentSizes(Constants.FONT_SIZE_LIST, FONT_SIZES_SIZE, true, true);

      Constants.FONT_SIZE_LIST.setToolTipText(Constants.FONT_SIZE_TOOLTIP_TEXT);

      Constants.FONT_SIZE_LIST.addActionListener(ActionFactory.createTabPaneFontActionListener());

      return Constants.FONT_SIZE_LIST;
   } // END createFontSizeList

   /** createDiceModOptionsList method */
   public static JComboBox<String> createDiceModOptionsList() {
      Constants.DICE_MOD_OPTIONS_LIST.setSelectedIndex(0);

      Constants.DICE_MOD_OPTIONS_LIST.setToolTipText(Constants.DICE_MOD_OPTIONS_TOOLTIP_TEXT);

      Constants.DICE_MOD_OPTIONS_LIST.addActionListener(ActionFactory.createDiceModOptionActionListener());

      return Constants.DICE_MOD_OPTIONS_LIST;
   } // END createDiceModOptionsList

   /** createCharacterGenderList method */
   public static JComboBox<String> createCharacterGenderList() {
      final Dimension GENDER_SIZE = new Dimension(105, 20);

      Util.setComponentSizes(Constants.CHARACTER_GENDER_LIST, GENDER_SIZE, true, true);

      Constants.CHARACTER_GENDER_LIST.setToolTipText(Constants.GENDER_TOOLTIP_TEXT);

      return Constants.CHARACTER_GENDER_LIST;
   } // END createCharacterGenderList

   /** createCharacterRaceList method */
   public static JComboBox<String> createCharacterRaceList() {
      final Dimension RACES_SIZE = new Dimension(105, 20);

      Util.setComponentSizes(Constants.CHARACTER_RACES_LIST, RACES_SIZE, true, true);

      Constants.CHARACTER_RACES_LIST.setToolTipText(Constants.RACE_TOOLTIP_TEXT);

      return Constants.CHARACTER_RACES_LIST;
   } // END createCharacterRaceList

   /** createCharacterClassList method */
   public static JComboBox<String> createCharacterClassList() {
      final Dimension CLASSES_SIZE = new Dimension(105, 20);

      Util.setComponentSizes(Constants.CHARACTER_CLASSES_LIST, CLASSES_SIZE, true, true);

      Constants.CHARACTER_CLASSES_LIST.setToolTipText(Constants.CLASS_TOOLTIP_TEXT);

      return Constants.CHARACTER_CLASSES_LIST;
   } // END createCharacterClassList

   /** createCharacterZodiacList method */
   public static JComboBox<String> createCharacterZodiacList() {
      final Dimension ZODIAC_SIZE = new Dimension(105, 20);

      Util.setComponentSizes(Constants.ZODIAC_LIST, ZODIAC_SIZE, true, true);

      Constants.ZODIAC_LIST.setToolTipText(Constants.ZODIAC_TOOLTIP_TEXT);

      return Constants.ZODIAC_LIST;
   } // END createCharacterZodiacList

   /** createSourceComplianceList method */
   public static JComboBox<String> createSourceComplianceList() {
      final Dimension SOURCE_COMPLIANCE_SIZE = new Dimension(105, 20);

      Util.setComponentSizes(Constants.SOURCE_COMPLIANCE_LIST, SOURCE_COMPLIANCE_SIZE, true, true);

      Constants.SOURCE_COMPLIANCE_LIST.setToolTipText(Constants.SOURCE_COMPLIANCE_TOOLTIP_TEXT);

      return Constants.SOURCE_COMPLIANCE_LIST;
   } // END createSourceComplianceList

   /** createVisibilityLevelList method */
   public static JComboBox<String> createVisibilityLevelList() {
      final Dimension VISIBILITY_LEVEL_SIZE = new Dimension(105, 20);

      Util.setComponentSizes(Constants.VISIBILITY_LEVEL_LIST, VISIBILITY_LEVEL_SIZE, true, true);

      Constants.VISIBILITY_LEVEL_LIST.setToolTipText(Constants.VISIBILITY_LEVEL_TOOLTIP_TEXT);

      return Constants.VISIBILITY_LEVEL_LIST;
   } // END createVisibilityLevelList
} // END class ComboBoxFactory